<!DOCTYPE html>
<html lang="zh">
<head th:replace="~{frag::head}"></head>
  
<body>
<div class="lyear-layout-web">
  <div class="lyear-layout-container">
    <!--左侧导航-->
	<aside th:replace="~{frag::sidebar}"></aside>
    <!--End 左侧导航-->
    
    <!--头部信息-->
    <header th:replace="~{frag::header}"></header>
    <!--End 头部信息-->
    
    <!--页面主要内容-->
    <main class="lyear-layout-content">
      
      <div class="container-fluid">

        <div class="row">
          
          <div class="col-lg-12">
            <div class="card">
              <div class="card-header">
                <h4>服务设施信息查询</h4>
                </div>
                  <div class="card-body">
                      <form class="form-horizontal" action="/facility" method="post">
                        <div class="form-group">
                            <label class="col-md-1 control-label" for="serId">设施编号</label>
                          <div class="col-md-4">
                            <input class="form-control" type="text" id="serId" name="serId" placeholder="请输入设施编号..">
                          </div>
                            <label class="col-md-1 control-label" for="serName">设施名称</label>
                          <div class="col-md-4">
                            <input class="form-control" type="text" id="serName" name="serName" placeholder="请输入设施名称..">
                          </div>
                        </div>
                        <div class="form-group">
                          <div class="col-md-11 col-md-offset-1">
                            <button class="btn btn-primary" type="submit">查询</button>
                            <button class="btn btn-secondary" type="reset">重置</button>
                            <a class="btn btn-info btn-w-md" href="/facility/addInit">添加新设施</a>
                          </div>
                        </div>
                      </form>
                  </div>
              </div>
            </div>
          </div>
          
        </div>

        <div class="row">
          
          <div class="col-lg-12">
            <div class="card">
              <div class="card-header">
                <h4>查询结果</h4>
              </div>
              <div class="card-body">
                <div class="table-responsive">
                  <table class="table table-hover">
                    <thead>
                      <tr>
						<th>序号</th>
                        <th>医疗服务设施编码</th>
                        <th>服务设施名称</th>
                        <th>收费类别</th>
                        <th>有效标志</th>
                        <th>操作</th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr th:each="fac,stat : ${facList}">
                        <td>[[${stat.count}]]</td>
                        <td>[[${fac.serId}]]</td>
                        <td>[[${fac.serName}]]</td>
                        <td>[[${fac.serExpType == 0?"西药":
								fac.serExpType == 1?"中成药":
								fac.serExpType == 2?"中草药":
								fac.serExpType == 3?"床位费":
								fac.serExpType == 4?"化验费":
								fac.serExpType == 5?"诊查费":
								fac.serExpType == 6?"检查费":
								fac.serExpType == 7?"护理费":
								fac.serExpType == 8?"特检费":
								fac.serExpType == 9?"输氧费":
								fac.serExpType == 10?"治疗费":
								fac.serExpType == 11?"输血费":
								fac.serExpType == 12?"特治费":
								fac.serExpType == 13?"医疗服务费":
								fac.serExpType == 14?"手术费":
								fac.serExpType == 15?"麻药费":
								fac.serExpType == 16?"产前检查费":
								fac.serExpType == 17?"材料费":
								fac.serExpType == 18?"新生儿费":
								fac.serExpType == 19?"内置材料":
								fac.serExpType == 20?"其他费":
								fac.serExpType == 21?"监护床位费":
								fac.serExpType == 22?"非处方药":
								fac.serExpType == 23?"处方药":
								fac.serExpType == 24?"甲类":
								fac.serExpType == 25?"乙类":
								fac.serExpType == 26?"丙类":
								fac.serExpType == 27?"疫苗费":
								fac.serExpType == 28?"诊查费":
								fac.serExpType == 29?"检查费":
								fac.serExpType == 30?"护理费":
								fac.serExpType == 31?"特检费":
								fac.serExpType == 32?"输氧费":
								fac.serExpType == 33?"治疗费":
								fac.serExpType == 34?"输血费":
								fac.serExpType == 35?"特治费":
								fac.serExpType == 36?"医疗服务费":
								fac.serExpType == 37?"手术费":
								fac.serExpType == 38?"麻药费":
								fac.serExpType == 39?"产前检查费":
								fac.serExpType == 40?"材料费":
								fac.serExpType == 41?"新生儿费":
								fac.serExpType == 42?"内置材料":
								fac.serExpType == 43?"其他费":
								"监护床位费"}]]
						</td>
						<td>[[${fac.serValid == 0?"无效":"有效"}]]</td>
                        <td>
                          <a th:href="@{/facility/updateInit(serId=${fac.serId})}">编辑</a>&nbsp;
                          <a th:href="@{/facility/delete(serId=${fac.serId})}"
						  		onclick="return window.confirm('是否确认删除当前服务设施信息？');")>删除</a>&nbsp;
                          <a th:href="@{/facility/detail(serId=${fac.serId})}">详情</a>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      
    </main>
    <!--End 页面主要内容-->
  </div>
</div>

<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>

<!--图表插件-->
<script type="text/javascript" src="/js/Chart.js"></script>
<script th:if="${addResult != null}">
	window.alert("[[${addResult}]]");
</script>
<script type="text/javascript">
$(document).ready(function(e) {
    var $dashChartBarsCnt  = jQuery( '.js-chartjs-bars' )[0].getContext( '2d' ),
        $dashChartLinesCnt = jQuery( '.js-chartjs-lines' )[0].getContext( '2d' );
    
    var $dashChartBarsData = {
		labels: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
		datasets: [
			{
				label: '注册用户',
                borderWidth: 1,
                borderColor: 'rgba(0,0,0,0)',
				backgroundColor: 'rgba(51,202,185,0.5)',
                hoverBackgroundColor: "rgba(51,202,185,0.7)",
                hoverBorderColor: "rgba(0,0,0,0)",
				data: [2500, 1500, 1200, 3200, 4800, 3500, 1500]
			}
		]
	};
    var $dashChartLinesData = {
		labels: ['2003', '2004', '2005', '2006', '2007', '2008', '2009', '2010', '2011', '2012', '2013', '2014'],
		datasets: [
			{
				label: '交易资金',
				data: [20, 25, 40, 30, 45, 40, 55, 40, 48, 40, 42, 50],
				borderColor: '#358ed7',
				backgroundColor: 'rgba(53, 142, 215, 0.175)',
                borderWidth: 1,
                fill: false,
                lineTension: 0.5
			}
		]
	};
    
    new Chart($dashChartBarsCnt, {
        type: 'bar',
        data: $dashChartBarsData
    });
    
    var myLineChart = new Chart($dashChartLinesCnt, {
        type: 'line',
        data: $dashChartLinesData,
    });
});
</script>
</body>
</html>